package com.yootk.action;

import com.yootk.service.OllamaDelegeteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OllamaAction {
    @Autowired
    private OllamaDelegeteService ollamaDelegeteService;
    @GetMapping("/ai/getMsg")
    public Object getOllame(@RequestParam(value = "msg") String msg) {
        return this.ollamaDelegeteService.getOllame(msg);
    }

    @GetMapping("/ai/stream/getMsg")
    public Object getOllameByStream(@RequestParam(value = "msg") String msg) {
        return this.ollamaDelegeteService.getOllameByStream(msg);
    }
}
